package me.zhengjie.repository;

import me.zhengjie.dto.sqlServer.WmsTask;
import org.springframework.data.jpa.repository.JpaRepository;
import org.springframework.data.jpa.repository.JpaSpecificationExecutor;

import java.util.List;

public interface WmsTaskRepository extends JpaRepository<WmsTask, Integer>, JpaSpecificationExecutor<WmsTask> {
    /**
     * 查找下一个需要执行的出入任务
     * 根据任务状态，任务创建时间
     */
    List<WmsTask> findWmsTasksByWcsTaskTypeAndStatusOrderByCreated(Integer wcsTaskType, Integer status);

    WmsTask findWmsTaskByWmsTaskIdAndWcsTaskType(Integer wmsTaskId,Integer wcsTaskType);
}
